<html>
	<aside id="sidebar" class="column">
		<h3>Menu Principal</h3>
		<ul class="toggle">
			<li class="icn_edit_article"><a href="indexMDsalida.php">Salida de Articulos</a></li>
			<li class="icn_categories"><a href="indexCrudRptSalidas.php">Reporte de Salidas</a></li>
		</ul>
	</aside><!-- end of sidebar -->
<a href="class.BootstrapProd.php?controlador=nuevo"><?php echo @$msg; ?></a>
<section id="main" class="column">
<?php if(@$msg!=""){ ?>
	<h4 class="alert_info"><?php echo @$msg ?></h4>
<?php } ?>
<br>
<form action="indexMDsalida.php">	
  <table cellpadding="2" cellspacing="2" width="95%" align="center" border="1" bgcolor="#EBEBEB" bordercolor="#FFFFFF"  style="border-collapse:collapse; border-style:solid;">
  <tr>
    <td width="100" bgcolor="#CCCCCC"><strong>Folio:</strong></td>
    <td width="603"><?php echo @$datos['folio'] ?></td>
    </tr>
  <tr>
    <td bgcolor="#CCCCCC"><strong>Fecha de salida:</strong></td>
    <td><?php echo @$datos['fecha'] ?></td>
    </tr>
	 <tr>
    <td bgcolor="#CCCCCC"><strong>Empleado:</strong></td>
    <td>
	<input name="emp" type="text" id="emp" value="<?php echo @$_REQUEST[emp] ?>" size="20" maxlength="20" >
	<label>
	<input type="image" name="choice" value="Elegir" onClick="window.open('js/JSwebPickerCrud/t3.php','popuppage','width=850,toolbar=1,resizable=1,scrollbars=yes,height=700,top=100,left=100');" src="images/icn_search.png">
	</label></td>
    </tr>
</table>
<br>
<table width="95%" cellpadding="2" cellspacing="2" width="95%" align="center" border="1" bgcolor="#EBEBEB" bordercolor="#FFFFFF"  style="border-collapse:collapse; border-style:solid;">
    <tr>
      <td width="152" bgcolor="#CCCCCC"><strong>
      Clave
      </strong></td>
      <td width="265" bgcolor="#CCCCCC"><strong>
      Descripcion
      </strong></td>
      <td width="79" bgcolor="#CCCCCC"><strong>Precio</strong></td>
      <td width="133" bgcolor="#CCCCCC"><strong>Cantidad</strong></td>
      <td width="158" bgcolor="#CCCCCC"><strong>Existencia</strong></td>
      <td width="97" bgcolor="#CCCCCC"><strong>Opcion</strong></td>
    </tr>
    <?php
	//var_dump($datosdet);
	if (@$datosdet)
    foreach ($datosdet as $key => $DetailSalidas) //Associative array $key = table, $row = row of $key
    {
		
	$row = $DetailSalidas->row;
	//@$row['total'] = $row['total'] + $row['importe'];
	//var_dump($row);
	//die();
    ?>
    <tr>
      <td align="left">
        <?php echo $row[0]['ArticuloClave'] ?>      </td>
      <td align="left">
        <?php echo $row[0]['ArticuloDescripcion'] ?>      </td>
      <td align="left"><?php echo $row[0]['ArticuloPrecioUnitario'] ?></td>
      <td align="left"><?php echo $row['cantidad'] ?></td>
      <td align="left"><?php echo $row['existencia'] ?></td>
      <td align="center"><a href='indexMDsalida.php?Quitar=Quitar&id=<?php echo $key ?>'><img src="images/icn_alert_error.png" border="0" />
        <input name="id" type="hidden" id="id" value="<?=$key ?>">
      </a></td>
    </tr>
	    <?php } //end foreach loop
	?>
    <tr>
      <td align="left"><input name="cveart" id="cveart" type="text" size="10" maxlength="10">
        <label>
        <input type="image" name="cveart" value="Elegir" onClick="window.open('js/JSwebPickerCrud/t2.php','popuppage','width=850,toolbar=1,resizable=1,scrollbars=yes,height=700,top=100,left=100');" src="images/icn_search.png">
        </label></td>
      <td align="left">&nbsp;</td>
      <td align="left">&nbsp;</td>
      <td align="left"><label></label>
        <label>
        <select name="cantidad" size="1" id="cantidad">
		<?php
		for($i=1;$i<=100;$i++){
			echo "<option>".$i."</option>";
		}
		?>
        </select>
        </label></td>
      <td align="left">&nbsp;</td>
      <td align="center"><input type="submit" name="Marcar" value="Marcar"></td>
    </tr>
</table>
<br>
<table width="95%" border="0" align="center">
  <tr>
    <td><input name="Procesar" type="submit" id="Procesar" value="Procesar">
      <input type="submit" name="Cancelar" value="Cancelar"></td>
  </tr>
</table>
<p><br>
</p>
</form>
</section>
</html>